<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
        <meta name="format-detection" content="telephone=no" />
        <title>快速补货</title>
        <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
        <link rel="stylesheet" type="text/css" href="../../css/common.css" />
        <style>
            body{
                background: #fff;
            }
            header .aui-title{
                font-size: 16px !important;
            }
            header {
                width: 100%;
                /*height: 45px;*/
                background: #fff;
                position: relative;
                z-index: 9;
            }
            .headerRight{
                overflow:hidden;
                position: absolute;
                right: 10px;
            }

            .aui-icon-left{
                padding-left:10px;
                position: absolute;
            }
            .win_title{
                text-align: center;
                width: 100%;
                line-height: 45px;
                height: 45px;
            }
            .aui-searchbar-wrap{
                width: 80%;
                float: left;
                background: #fff;
            }
            .aui-searchbar{
                -webkit-box-pack:start;
                padding-left: 15px;
                background: #f3f3f3;
            }
            .expansion{
                width: 20%;
                float: left;
                font-size: 12px;
                text-align: center;
                height: 50px;
                line-height: 50px;
            }
            .search{
                padding: 0  15px;
                overflow: hidden;
            }
        </style>
    </head>
    <body>
        <header class="">
            <div class="win_title aui-border-b"> 
                <div class="aui-pull-left aui-iconfont aui-icon-left icon-left-coler" tapmode onclick="closeWin()"></div>
                <div class="headerRight">
                    <i class="aui-iconfont aui-icon-more aui-pull-left" tapmode ></i>
                </div>
                <div class="">
                    快速补货
                </div>
            </div> 
            <div class="search aui-border-b">
                <div class="aui-searchbar-wrap demo" id="search">
                    <div class="aui-searchbar aui-border-radius" tapmode onclick="openToTwo('search')">
                        <i class="aui-iconfont aui-icon-search"></i>

                        <div class="aui-searchbar-text">搜索商品名/种类/供应商</div>
                        <div class="aui-searchbar-input">
                            <form action="javascript:search();">
                                <input type="search" placeholder="请输入搜索内容" id="search-input">
                            </form>
                        </div>
                        <i class="aui-iconfont aui-icon-roundclosefill" tapmode onclick="clearInput()"></i>
                    </div>
                    <div class="aui-searchbar-cancel aui-text-info" tapmode onclick="cancelSearch()">取消</div>
                </div>
                <div class="expansion" data-type="hide" tapmode onclick="expansion(this)">展开视图</div>
            </div>
        </header>

        <div class="myPicker">
            <ul class="aui-list-view">
                <li class="aui-list-view-cell">
                     <i class="aui-iconfont aui-icon-comment newMeg"></i><span>我的消息 </span>
                </li>
                <li class="aui-list-view-cell">
                     <i class="aui-iconfont aui-icon-home"></i><span>首页</span>
                </li>
            </ul>
        </div>
    </body>
    <script type="text/javascript" src="../../script/api.js"></script>
    <script type="text/javascript" src="../../script/common.js"></script>
    <script type="text/javascript" src="../../script/jquery-1.11.3.js"></script>
    <script type="text/javascript" src="../../script/mui.js"></script>
    <script type="text/javascript">
        apiready = function() {
            api.parseTapmode();
            var mobile = api.pageParam.mobile;
            var header = $api.dom('header');
            $api.fixIos7Bar(header);
            
            var header_h = $api.offset(header).h;
            var body_h = $api.offset($api.dom('body')).h - header_h;
            api.openFrame({
                name : 'replenish_frm',
                url : 'replenish_frm.html',
                rect : {
                    x : 0,
                    y : header_h,
                    w : 'auto',
                    h : body_h
                },
                pageParam : {
                    mobile : mobile
                },
                bounces : false,
                vScrollBarEnabled : false,
                hScrollBarEnabled : false
            });
        }
        function expansion(obj){
           var type=$(obj).attr("data-type");
           if(type=="hide"){
                $(obj).attr("data-type","show");
                $(obj).text("隐藏视图");
           }else{
                $(obj).attr("data-type","hide");
                $(obj).text("显示视图");
           }
           api.execScript({
                frameName:"replenish_frm",
                script:"edit('"+type+"')"
           })
        }
        // mui遮罩
        var mask = mui.createMask(hidePicker);
        // 显示遮罩
        function showPicker(){
            mask.show();
            // $(".myPicker").addClass("pickAnimate");
        }
        // 关闭遮罩
        function hidePicker(){
            mask.myclose();
            // 跨域隐藏frm的遮罩
            api.execScript({
                frameName:"replenish_frm",
                script:"hidePicker()"
            })
        }
        // 关闭遮罩
        function hidePicker1(){
            mask.myclose();
        }
    </script>
</html>
